package com.yshy.moviechoseseatinginnerapi.controller;

import com.yshy.moviechoseseatinginnerapi.service.RegionsService;
import com.yshy.moviechoseseatingcommon.entity.bo.regions.ListByCityIdBo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.validation.Valid;

/**
 * 区域api
 * @create: 下午1:40
 **/
@RestController
@RequestMapping("/regions")
public class RegionsController {
    @Autowired
    private RegionsService regionsServerce;
    /**
     * 查询城市区域
     * @return
     */
    @PostMapping("/listByCityId")
    public String listByCityId(@RequestBody @Valid ListByCityIdBo bo){
        return regionsServerce.listByCityId(bo);
    }
}
